package com.jiang.daily.Q2275;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/01/12 0:44
 */
class Solution {
    public int largestCombination(int[] candidates) {
        // 1 <= candidates[i] <= 1_000_000_0  2^24 == 16,777,216
        int res = 0;
        for (int i = 0; i < 24; i++) {
            int len = 0;
            for (int c: candidates) {
                if ((c & (1 << i)) > 0) len++;
            }
            res = Math.max(res, len);
        }
        return res;
    }
}